package com.gluxen.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.gluxen.dao.IBaseDao;
import com.gluxen.entity.Role;
@Service
public class RoleService extends BaseService implements IRoleService{
    
	@Resource
	IBaseDao baseDao;
	@SuppressWarnings("unchecked")
	@Override
	public List<Role> queryObjectList(String hql) {
		
		return (List<Role>) baseDao.getObjectList(hql);
	}

    @SuppressWarnings("unchecked")
	@Override
	public List<Object> queryListByNavtiveSql(String string) {
		return (List<Object>) baseDao.getObjectsByNativeSql(string);
	}

	@Override
	public void addRole(Role role) {
		add(role);
	}

	@Override
	public void updateRole(Role role) {
		baseDao.update(role);
	}

	@Override
	public void deleteRoles(String string) {
		baseDao.deleteEntities(Role.class, string);
	}

}
